-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow site admin to disable mirrors #11740
Conversation
Signed-off-by: jolheiser <[email protected]>
Signed-off-by: jolheiser <[email protected]>
Signed-off-by: jolheiser <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a comment change suggestion. Otherwise LG-TM.
Co-authored-by: guillep2k <[email protected]>
ping LG-TM |
@Codeberg-org this can be usefull for you :) (so you can drop your own patch then ...) |
@@ -118,7 +118,7 @@ func Migrate(ctx *context.APIContext, form auth.MigrateRepoForm) { | |||
RepoName: form.RepoName, | |||
Description: form.Description, | |||
Private: form.Private || setting.Repository.ForcePrivate, | |||
Mirror: form.Mirror, | |||
Mirror: form.Mirror && !setting.Repository.DisableMirrors, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would had prefered to return an error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-> #11757
* Allow site admin to disable mirrors Signed-off-by: jolheiser <[email protected]> * No need to run through Safe Signed-off-by: jolheiser <[email protected]> * Clarify only disabling NEW mirrors Signed-off-by: jolheiser <[email protected]> * Apply suggestions from @guillep2k Co-authored-by: guillep2k <[email protected]> Co-authored-by: guillep2k <[email protected]>
Wording is consistent with
FORCE_PRIVATE
This will stop the creation of new mirror migrations. For existing mirrors, the site admin will need to turn off the cron for updating them (or delete them).